import axios from "axios";
import {showMsg} from "@/utils/"
const request = axios.create()

request.interceptors.response.use(function (res){
  if (res.data.code !== 0) {
    showMsg({
      content: res.data.msg,
      type: 'error'
    })
    return null
  }
  return res.data.data
})

export default request